package edu.iss.javaproject.util;
import java.io.FileWriter;
import java.io.IOException;

import edu.iss.javaproject.model.Users;
 
public class GenerateCsv
{
   public static void main(String [] args)
   {
	   		//Users user = null;
           generateCsvFile(); 
   }
 
   private static void generateCsvFile()
   {
        try
        {
            FileWriter writer = new FileWriter("g:\\users.csv");
 
            
            writer.append("id");
            writer.append(',');
            writer.append("password");
            writer.append(',');
            writer.append("name");
            writer.append(',');
            writer.append("ic");
            writer.append(',');
            writer.append("contact");
            writer.append(',');
            writer.append("address");
            writer.append(',');
            writer.append("email");
            writer.append(',');
            writer.append("department");
            writer.append(',');
        	writer.append("designation");
        	writer.append(',');
        	writer.append("role");
        	writer.append(',');
        	writer.append("otHours");
        	writer.append(',');
        	writer.append("managerId");
        	writer.append(',');
        	writer.append("medical");
        	writer.append(',');
        	writer.append("annual");
        	writer.append(',');
        	writer.append("compensation");
        	writer.append(',');
        	writer.append('\n');
        	
        	  writer.append("id");
              writer.append(',');
              writer.append("password");
              writer.append(',');
              writer.append("name");
              writer.append(',');
              writer.append("ic");
              writer.append(',');
              writer.append("contact");
              writer.append(',');
              writer.append("address");
              writer.append(',');
              writer.append("email");
              writer.append(',');
              writer.append("department");
              writer.append(',');
          	writer.append("designation");
          	writer.append(',');
          	writer.append("role");
          	writer.append(',');
          	writer.append("otHours");
          	writer.append(',');
          	writer.append("managerId");
          	writer.append(',');
          	writer.append("medical");
          	writer.append(',');
          	writer.append("annual");
          	writer.append(',');
          	writer.append("compensation");
          	writer.append(',');
          	writer.append('\n');
        	 
        
 
            //generate whatever data you want
 
            writer.flush();
            writer.close();
            System.out.print("Done");
        }
        catch(IOException e)
        {
             e.printStackTrace();
        } 
    }
}
